package com.coder.bike.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Getter
@Setter
@Accessors(chain = true)
@TableName("busi_payment")
public class Payment implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    
    private String paymentNo;          // 支付单号
    private Integer customerId;        // 客户ID
    private BigDecimal amount;         // 支付金额
    private String subject;            // 支付主题/商品描述
    private String status;             // 支付状态: WAITING(等待支付), SUCCESS(支付成功), FAILED(支付失败), CLOSED(已关闭)
    private String qrcodeUrl;          // 收款码URL
    private LocalDateTime createTime;  // 创建时间
    private LocalDateTime expireTime;  // 过期时间
    private LocalDateTime payTime;     // 支付时间
    
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime updateTime;  // 更新时间
}